#include <QtCore/QCoreApplication>
#include <QtGlobal>

#include "SimPhy.h"



int main(int argc, char *argv[])
{
    QCoreApplication app(argc, argv);


    SimPhy::Particle a, b;

    b.setPosition(SimPhy::Vector3D(10.0));

    SimPhy::ParticleForceRegistry registry;

    SimPhy::ParticleSpringGenerator spring(&a, 4.0, 9.0);

    registry.add(&b,&spring);

    std::cout << b.getPosition() << std::endl;

    for(unsigned int i=0; i<40; i++)
    {
        registry.updateForces(0.1);
        b.explicitEulerIntegrate(0.1);
        std::cout << b.getPosition() << std::endl;
    }







    return app.exec();

}
